package svc

import (
	"biz-hub/api/internal/config"
	"biz-hub/bizhubrpc/bizhubrpcclient"
	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config    config.Config
	BizHubRpc bizhubrpcclient.Bizhubrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:    c,
		BizHubRpc: bizhubrpcclient.NewBizhubrpc(zrpc.MustNewClient(c.BizHubRpc)),
	}
}
